package com.hd.service.test;

import java.util.List;

import com.hd.common.DataPage;
import com.hd.persistence.model.Appraisal;
import com.hd.utils.HdException;

public class AppraisalManagerTestCase extends BaseTest {
	
	//保存实体
//	public void testSaveAppraisal() throws HdException {
//		for ( int i = 0; i < 5; i++ ) {
//			Appraisal appraisal = new Appraisal();
//			appraisal.setAppraiseEffect(1);
//			appraisal.setAppraiseTechnic(1);
//			appraisal.setAppraiseAttitude(1);
//			ReturnRecord returnRecord = new ReturnRecord();
//			returnRecord.setReturnRecordId(1L+i);
//			appraisal.setReturnRecord(returnRecord);
//			repairManager.saveAppraisal(appraisal);
//		}
//	}
	
	//分页查询客户评价
	public void testPageQueryAppraisals() throws HdException {
		DataPage<Appraisal> dataPage = repairManager.pageQueryAppraisals(1, 10);
		System.out.println("查询总数为:" + dataPage.getTotalCount());
		List<Appraisal> appraisals = dataPage.getData();
		for ( Appraisal appraisal : appraisals ) {
			System.out.println(appraisal.getAppraisalId() + " " + appraisal.getAppraiseAttitude());
		}
	}

}
